package com.baitengsoft.patentservicemonitor.api.service.impl;

import com.baitengsoft.patentservicemonitor.api.dao.RptAgencyDao;
import com.baitengsoft.patentservicemonitor.api.entity.RptAgencyEntity;
import com.baitengsoft.patentservicemonitor.api.service.RptAgencyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by 周俊 on 2018/1/10.
 */
@Service("RptAgencyService")
public class RptAgencyImpl implements RptAgencyService {
    @Autowired
    RptAgencyDao rptAgencyDao;

    @Override
    public void deleteRptAgency(Integer PlatformID) {
        rptAgencyDao.deleteRptAgency(PlatformID);
    }

    @Override
    public void addorUpdateRptAgencyInfo(RptAgencyEntity rptAgencyEntity) {
        if (rptAgencyEntity.getID() > 0) {//更新数据
            rptAgencyDao.update(rptAgencyEntity);
        } else {//插入数据
            rptAgencyDao.save(rptAgencyEntity);
        }
    }
}
